from django.db import models

# Create your models here.
class LoginLog(models.Model):
    """
    LoginLog
    """
    id = models.BigAutoField(primary_key=True)
    user_id = models.IntegerField(verbose_name="用户ID", blank=False, null=False)
    username = models.CharField(verbose_name="用户名称", max_length=128, blank=False, null=False)
    login_address = models.CharField(verbose_name="登陆地址", max_length=128, blank=False, null=False)
    login_ip = models.GenericIPAddressField(verbose_name="登陆ip", null=True, blank=True, default='')

    created_at = models.DateTimeField(auto_now_add=True)
    updated_at = models.DateTimeField(auto_now=True)

